<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
* {
    margin: 0;
    padding: 0;
}

div {
    width: 40px;
    height: 40px;
    background-color: pink;
    position: absolute;
    left: 0;
    top: 0;
    
    border-radius: 50%;
}
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<script>
var divs = document.querySelectorAll("div");
document.onmousemove = function (e){
    var left = e.clientX - 20;
    var top = e.clientY - 20;
    for(let i = 0; i < divs.length; i++){
        setTimeout(function (){
            divs[i].style.left = left + "px";
            divs[i].style.top = top + "px";
        }, 30 * i + 20)
    }
    
}
</script>
</body>
</html>